<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="<%=path%>/css/manager/bbs_information4.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="<%=path%>/js/manager/jquery-1.8.2.js"></script>
<!-- ueditor编辑器 -->
<script type="text/javascript" charset="utf-8" src="/forumsystem/js/utf8-jsp/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/forumsystem/js/utf8-jsp/ueditor.all.min.js"> </script>
<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script type="text/javascript" charset="utf-8" src="/forumsystem/js/utf8-jsp/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
	//实例化编辑器
	 var ue = UE.getEditor('editor');
	//对编辑器的操作最好在编辑器ready之后再做
	 ue.ready(function() {
	     //设置编辑器的内容
	     ue.setContent($("#basContent").val());
	     //获取html内容，返回: <p>hello</p>
	     var html = ue.getContent();
	      
	 });
	<%--  <script id="editor" type="text/plain" style="width:1024px;height:500px;"></script>
	 <input type="hidden" id="newsContent"  name="newsContent" value='${news.newsContent}'/> --%>
</script>
<title>诚聘精英</title>
</head>
<body>

	<!--
        	作者：offline
        	时间：2016-12-22
        	描述：论坛内容头部（统一，部分二级字体颜色单独修改）
        -->
		<div class="news_div1">
			<div class="news_div1_div1">论坛相关信息</div>
			<div class="news_div1_div2">
				<a href="<%=path%>/basicctr/bbscontact.htm?markManage=3" class="news_div1_div2_div1">联系我们</a>
				<a>|</a>
				<a href="###" class="news_div1_div2_div2 ablack">诚聘精英</a>
			</div>
		</div>
		<!--
        	作者：offline
        	时间：2016-12-24
        	描述：论坛相关信息
        -->
        <div class="bbs_tion4_div1">
        <form action="bbsbasicmanage.htm" id="sform" method="post">
		  <input type="hidden" id="sysuserId" name="basUptuser" value="${back_user.sysuserId}"/>
		  <input type="hidden" id="markManage" name="markManage" value="${basic.markManage}"/>
		  <input type="hidden" id="basId" name="basId" value="${basic.basId}"/>
        
        	<div class="bbs_div1_div1">
        		<span class="bbs_div1_div1_sp1">编辑诚聘精英</span>
        	</div>
        	<div class="bbs2_div2_div2">
        		<div class="bbs2_div2_div2_div1">信息标题</div>
        		<input class="bbs2_div2_div2_in1" type="text" placeholder="输入新闻标题" maxlength="50" id="basTheme" name="basTheme" value="${basic.basTheme}"/>
        		<div class="bbs2_div2_div2_div2">还能输入<em>50</em>个字</div>
        	</div>
        	<div class="bbs2_div2_div3">
        		<div class="bbs2_div2_div3_div1">相关内容</div>
        		<div class="bbs2_div2_div3_div2">
        			<p class="bbs2_div2_div3_div2_p1">1、图片尺寸为：每张图片不超过1024kb，仅支持jpg.jpeg.和png.格式；</p>
        			<p class="bbs2_div2_div3_div2_p2">2、图片要清晰，不能虚化。</p>
        			<div class="">
        			<%-- <textarea id="basContent" name="basContent">${basic.basContent}</textarea> --%>
        					<script id="editor" type="text/plain" style="width:1024px;height:500px;"></script>
						    <input type="hidden" id="basContent"  name="basContent" value='${basic.basContent}'/>
        			</div>
        		</div>
        	</div>
        	
        	<div class="bbs2_div2_div5">
        		<input class="bbs2_div2_div5_in1" type="submit"  onclick="return submitCheck()" value=""/>
        		<input class="bbs2_div2_div5_in2" type="button"  onclick="back()"/>
        	</div>
        	  
</form>
        </div>
</body>
<script type="text/javascript">
	//提交验证
	function submitCheck() {
		//验证管理员登录
		var sysuserId=$("#sysuserId").val();
		if(sysuserId.length==0){
			alert("管理员登录失效，请重新登录");
			window.open("<%=path%>/login/beforelogin.htm");
			return false;
		}
		//信息标题
		var basTheme = $.trim($("#basTheme").val());
		if (basTheme.length == 0) {
			alert("信息标题不能为空！");
			$("#basTheme").focus();
			return false;
		} else{
			$("#basTheme").val(basTheme);
		}
	 return true;
	}
	//返回事件
	function back() {
		window.location.href="<%=path%>/basicctr/bbsrecruit.htm?markManage=3";
	}
	//上传头像
	function selectImagez(file) {
		//控制显示oldImg路径
		$('#oldImg').attr("disabled",false); 
		if (!file.files || !file.files[0]) {
			return;
		}
		var image = '';
		var reader = new FileReader();
		reader.onload = function(evt) {
			document.getElementById('imagez').src = evt.target.result;
			image = evt.target.result;
			$.ajax({
				type : "post",
				url : '<%=path%>/imageController/updateImg.htm',
						data : {
							image : image,
							oldImg : file.id,
							path : "/upload/images/bbsmap/"
						},
						async : false,
						dataType : 'json',
						success : function(data) {
							$("#mapimg").val(data);
							$("#oldImg").val(data);
							file.id = data;
						},
						error : function(err) {
							alert('网络故障');
						}
					});
		}
		reader.readAsDataURL(file.files[0]);
		return false;
	}
</script>
</html>